package com.zhangfb95.crosschain.infra.util;

import java.util.Base64;

/**
 * @author zhangfubing
 * @since 2023/12/15
 */
public class Base64Util {

    public Base64Util() {
        throw new UnsupportedOperationException();
    }

    public static String encodeToString(byte[] src) {
        return Base64.getEncoder().encodeToString(src);
    }

    public static String decodeToString(String src) {
        return new String(Base64.getDecoder().decode(src));
    }
}
